import http from '@/utils/http.js'

// 账号密码登录
export const userLogin = (data) => http.post('/merchantsapi/login/pwd',data)

// 验证码
export const phoneCode = (data) => http.post('', data)

// 手机号登录
export const phoneLogin = (data) => http.post('', data)

// 获取用户信息
export const getUserInfo = () => http.get('/merchantsapi/info')

// 注销登录
export const logout = () => http.post('/merchantsapi/logout')

// 分页
export const userPage = (params)=> http.get('/merchantsapi/user/page', params)

// 详情
export const userDetail = (id)=> http.get(`/merchantsapi/user/detail/${id}`)

// 添加
export const userAdd = (data)=> http.post('/merchantsapi/user/add', data)

// 编辑
export const userEdit = (data)=> http.post('/merchantsapi/user/edit', data)

// 删除
export const userDelete = (id)=> http.delete(`/merchantsapi/user/delete/${id}`)
